﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class MyWindow : EditorWindow
{
    string myString = "Hello World!";
    bool groupEnabled;
    bool myBool = true;

    float myFloat = 2.33f;

    [MenuItem("Test/MyWindow")]
    public static void showWindow()
    {
        EditorWindow.GetWindow(typeof(MyWindow));
    }


    private void OnGUI()
    {
        GUILayout.Label("Base setting");
        myString = EditorGUILayout.TextField("这是文本", myString);


        groupEnabled = EditorGUILayout.BeginToggleGroup("Options setting", groupEnabled);

        myBool = EditorGUILayout.Toggle("这是复选框", myBool);

        myFloat = EditorGUILayout.Slider("这是滑动条", myFloat, 0, 5);

        EditorGUILayout.EndToggleGroup();
    }
}
